<?php 
class rpc_server{
	private $server;
	function __construct(){
		require 'phprpc/phprpc_server.php';
		$this->server = new PHPRPC_Server();
		$this->server->add(array(
				'server_hello',
			),$this);
		$this->server->start();
	}
	function server_hello(){
		return 'hello world!';	
	}
}

$server = new rpc_server();
?>